-- GENERATED SPELL FOR [Stormpike Defender] --


function spell0_12050(pUnit, Event) --@Revenge,n/a--
pUnit:FullCastSpellOnTarget(19130,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_12050', 0, 1)
end

function spell1_12050(pUnit, Event) --@Shield Block,Self--
pUnit:FullCastSpellOnTarget(12169,pUnit)
pUnit:RegisterEvent('Sorts_12050', 5269, 1)
end

function Sorts_12050(pUnit, Event)
local choix_sorts_12050 = math.random(0, 1)
if choix_sorts_12050 == 0 then
pUnit:RegisterEvent('spell0_12050', 1, 1)
end
if choix_sorts_12050 == 1 then
pUnit:RegisterEvent('spell1_12050', 1, 1)
end
end

function mob12050_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_12050', math.random(1500, 3000), 1)
end

function mob12050_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob12050_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob12050_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(12050, 1, 'mob12050_Action')
RegisterUnitEvent(12050, 2, 'mob12050_Leave')
RegisterUnitEvent(12050, 3, 'mob12050_Kill')
RegisterUnitEvent(12050, 4, 'mob12050_Die')
